// 1.数组
const info1: any[] = ["why", 18, 1.88]
const value = info1[2]

// 2.使用对象(最多)
const info2 = { name: "why", age: 18, height: 1.88 }

// 3.元组
// 元组数据结构中允许存放不同的数据类型,取出来的item也有明确的类型
const info3: [string, number, number] = ["why", 18, 1.88]
const value2 = info3[2]

// 在函数中使用元组类型最多,特别是函数的返回值
function useState(initialState: any): [any, (newValue: number) => void] {
  let stateValue = initialState
  function setValue(newValue: any) {
    stateValue = newValue
  }
  return [stateValue, setValue]
}

const [count, setCount] = useState(10)


export { }